package com.example.tiptravel.model.impl;

import com.example.tiptravel.api.RetroManager;
import com.example.tiptravel.entity.post.PostBean;
import com.example.tiptravel.model.IPostModel;

import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by 张稳 on 2016/11/9.
 */

public class PostModelImpl implements IPostModel {
    @Override
    public void getPostData(Subscriber<PostBean> subscriber) {
        RetroManager.getInstance().getPostService().getPostData()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }
}
